import request from '@/utils/request'

// 下载文件
export const downloadFile = (fileName) => {
  return request({
    url: `/api/download/file/${fileName}`,
    method: 'get',
    responseType: 'blob'
  })
}

// 下载 Word 文件
export const downloadWord = (uuid) => {
  return request({
    url: `/api/download/word/${uuid}`,
    method: 'get',
    responseType: 'blob'
  })
}

// 下载 Excel 文件
export const downloadExcel = (uuid) => {
  return request({
    url: `/api/download/excel/${uuid}`,
    method: 'get',
    responseType: 'blob'
  })
}

// 获取可下载文件列表
export const getDownloadableFiles = (uuid) => {
  return request({
    url: `/api/download/files/${uuid}`,
    method: 'get'
  })
}

// 获取结果文件列表
export const getResultFiles = (silent = false) => {
  return request({
    url: '/api/download/results',
    method: 'get',
    silent
  })
}




